package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 客户订单退款表
 */
@Data
@TableName("t_cusReturn")
public class CusReturnBean {
    /**退货订单编号*/
    @TableId(value = "pk_cusReturnId",type = IdType.AUTO)
    private Integer cusReturnId;

    /**退货订单唯一编号*/
    @TableField("returnOrder")
    private String returnOrder;//

    /**订单编号*/
    @TableField("orderNum")
    private String orderNum;
    /**付款总额*/
    @TableField("totalPrice")
    private double totalPrice;//
    /**退款订单时间*/
    @TableField("returnDate")
    private LocalDate returnDate;//
    /**退货订单状态*/
    @TableField("auditStatus")
    private String auditStatus;//已入库/未入库 //
    /**退货人名字*/
    @TableField("customerName")
    private String customerName;
    /**
     * 退货订单里的商品集合
     */
    @TableField(exist = false)
    private List<OrderReturnProductBean> orderReturnProductBeans;

    public CusReturnBean(String returnOrder, double totalPrice, LocalDate returnDate, String auditStatus) {
        this.returnOrder = returnOrder;
        this.totalPrice = totalPrice;
        this.returnDate = returnDate;
        this.auditStatus = auditStatus;
    }

    public CusReturnBean() {
    }

    public CusReturnBean(String orderNum, double totalPrice, LocalDate returnDate, String auditStatus, String customerName) {
        this.orderNum = orderNum;
        this.totalPrice = totalPrice;
        this.returnDate = returnDate;
        this.auditStatus = auditStatus;
        this.customerName = customerName;
    }

    public CusReturnBean(String orderNum, double totalPrice, LocalDate returnDate, String auditStatus, String customerName, List<OrderReturnProductBean> orderReturnProductBeans) {
        this.orderNum = orderNum;
        this.totalPrice = totalPrice;
        this.returnDate = returnDate;
        this.auditStatus = auditStatus;
        this.customerName = customerName;
        this.orderReturnProductBeans = orderReturnProductBeans;
    }

    public CusReturnBean(String returnOrder, String orderNum, double totalPrice, LocalDate returnDate, String auditStatus) {
        this.cusReturnId = cusReturnId;
        this.returnOrder = returnOrder;
        this.orderNum = orderNum;
        this.totalPrice = totalPrice;
        this.returnDate = returnDate;
        this.auditStatus = auditStatus;
    }

    public CusReturnBean(Integer cusReturnId, List<OrderReturnProductBean> orderReturnProductBeans) {
        this.cusReturnId = cusReturnId;
        this.orderReturnProductBeans = orderReturnProductBeans;
    }
}
